The upper and lower layer bed especially the upper layer bed of the bunk bed must have guardrail for preventing an individual from falling out of the bed. Traditional guardrails are fixed between the two upright poles which are the upper portion of the legs beyond the upper layer bed of the bunk bed, or the fixing upright poles fixed in the edge of the upper layer bed. Because the guardrail and the upright poles are un-removable, thus the occupied room can not be changed according to requirements such as in transporting, carrying, storing, and the transporting, carrying, storing are very inconvenient.